#include <iostream>
using namespace std;

signed main()
{
    int n;
    cin>>n;
    string s;
    getline(cin,s);
    for(int i=0;i<n;i++){
        getline(cin,s);
        if(s.size()<6){
            cout<<"Your password is tai duan le.\n";
            continue;
        }
        int flagC = 0,flagN = 0,flag = 0;
        for(int j=0;j<s.size();j++){
            if(!(s[j]>='a'&&s[j]<='z'||s[j]>='A'&&s[j]<='Z'||s[j]>='0'&&s[j]<='9'||s[j]=='.')){
                flag = 1;
                break;
            }
            if(s[j]>='a'&&s[j]<='z'||s[j]>='A'&&s[j]<='Z')    flagC = 1;
            if(s[j]>='0'&&s[j]<='9')    flagN = 1;
        }
        if(flag){
            cout<<"Your password is tai luan le.\n";
            continue;
        }
        if(flagC&&!flagN){
            cout<<"Your password needs shu zi.\n";
            continue;
        }
        if(!flagC&&flagN){
            cout<<"Your password needs zi mu.\n";
            continue;
        }
        cout<<"Your password is wan mei.\n";
    }
    return 0;
}
